package class202205.demo15.demo14.BinaryTree;

import java.util.LinkedList;
import java.util.List;
import java.util.Queue;

public class Test {

    public static void main2(String[] args) {
        Queue<BinaryTree.TreeNode> queue = new LinkedList<>();
        //放入元素
        queue.offer(null);
        queue.offer(null);
        queue.offer(null);
        System.out.println(queue.size());
        System.out.println(queue.isEmpty());
    }


    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        //接收一下root
        BinaryTree.TreeNode root = binaryTree.createTree();


        boolean fly2 = binaryTree.isSymmetric(root);
        System.out.println(fly2);


        /*boolean fly = binaryTree.isCompleteTree(root);
        System.out.println(fly);*/

        /*binaryTree.levelOrder(root);
        System.out.println();*/

        //根节点
       /* binaryTree.preOrder(root);
        System.out.println();
        int ret = binaryTree.size2(root);
        System.out.println("结点的个数: "+ret);

        int ret1 = binaryTree.getLeafNodeCount2(root);
        System.out.println("叶子结点的个数: "+ret1);

        System.out.println("第k层节点个数: "+ binaryTree.getKLevelNodeCount1(root,4));

        System.out.println("树的高度为: "+binaryTree.getHeight(root));

        BinaryTree.TreeNode ret2 = binaryTree.find(root,'E');
        System.out.println(ret2.val);*/

        /*binaryTree.getLeafNodeCount1(root);
        System.out.println("叶子结点的个数: "+BinaryTree.leafSize);*/

        /*binaryTree.size(root);
        System.out.println("结点的个数: "+BinaryTree.nodeSize);*/


        /*List<Character> ret = binaryTree.preorderTraversal(root);
        System.out.println(ret);
        System.out.println("---------------");*/
        //binaryTree.inOrder(root);
        //System.out.println();
        //binaryTree.postOrder(root);
        //System.out.println();
    }
}
